#!/usr/bin/env python3
"""
RAG系统快速启动脚本
"""

import sys
import os

# 添加src目录到Python路径
sys.path.append(os.path.join(os.path.dirname(__file__), 'src'))

def main():
    """主函数"""
    print("=" * 60)
    print("旅游智能助手 RAG 系统")
    print("=" * 60)
    print()
    print("请选择要执行的操作:")
    print("1. 运行完整系统测试")
    print("2. 运行交互式问答")
    print("3. 运行使用示例")
    print("4. 退出")
    print()
    
    while True:
        try:
            choice = input("请输入选择 (1-4): ").strip()
            
            if choice == '1':
                print("\n开始运行完整系统测试...")
                from test.test_complete_rag import test_complete_rag_pipeline
                test_complete_rag_pipeline()
                break
                
            elif choice == '2':
                print("\n开始交互式问答...")
                from test.test_complete_rag import interactive_test
                interactive_test()
                break
                
            elif choice == '3':
                print("\n开始运行使用示例...")
                from example_usage import main as example_main
                example_main()
                break
                
            elif choice == '4':
                print("退出程序")
                break
                
            else:
                print("无效选择，请输入 1-4")
                
        except KeyboardInterrupt:
            print("\n\n程序被用户中断")
            break
        except Exception as e:
            print(f"\n执行出错: {str(e)}")
            break

if __name__ == "__main__":
    main()
